#include <stdio.h>
int power(int x, int n) {
    int res = 1;
    for (int i = 0; i < n; i++) 
        res *= x;
    return res;
}
int f(int x) {
    return 3 * power(x, 5) + 2 * power(x, 4) - 5 * power(x, 3) - power(x, 2) + 7 * x - 6;
}
int main(void)
{
    printf("3x^5 + 2x^4 - 5x^3 - x^2 + 7x -6 = ?\n");
    int x;
    printf("输入x的值：");
    scanf("%d", &x);
    printf("结果: %d\n", f(x));
    return 0;
}